/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package Brain;

import java.util.Date;
import java.text.DateFormat;
import java.text.SimpleDateFormat;

/**
 *
 * @author Dan dotcom
 */
public class Tiempo extends Thread {
    
    public int dc = 0;
    public boolean disponible = false;
    
    public void run() {
        
        if (!disponible)
        {
            for(;;) {
            
            DateFormat dateFormat = new SimpleDateFormat("h:mm a");
            Date date = new Date();
           
            if (dateFormat.format(date).contains("A")) {
               dc = 1;
            }
            else {
               dc = 0;
            }
            
            }
        }
       
        }
    }
